package com.longqin.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 需求管理
 * </p>
 *
 * @author longqin
 * @since 2024-12-23
 */
@Getter
@Setter
@TableName("bus_requirement")
@ApiModel(value = "BusRequirement对象", description = "需求管理")
public class BusRequirement implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("需求主题")
    @TableField("title")
    private String title;

    @ApiModelProperty("需求描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("创建人")
    @TableField("creator")
    private Integer creator;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 前端时间字符串转java时间戳
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // 后台时间戳转前端时间字符串(json对象)
    private LocalDateTime createTime;

    @ApiModelProperty("组织机构ID")
    @TableField("organization_id")
    private Integer organizationId;

    @ApiModelProperty("状态：1-编制，2-审核，3-发布，0-删除")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("需求编码")
    @TableField("code")
    private String code;

    @ApiModelProperty("创建人部门id")
    @TableField("department_id")
    private Integer departmentId;

    @ApiModelProperty("附件")
    @TableField("attachments")
    private String attachments;

    @ApiModelProperty("提出人")
    @TableField(exist = false)
    private String userName;
    
    @ApiModelProperty("提出部门")
    @TableField(exist = false)
    private String departmentName;
    
    @ApiModelProperty("流程工作进程ID")
    @TableField(exist = false)
    private Integer processId;
    
    @ApiModelProperty("实例节点配置项")
    @TableField(exist = false)
    private String workNodes;

}
